home *** CD-ROM | disk | FTP | other *** search
- # man: send back a manual page on a service
- #
-
- proc man {switches envelope inputs } {
- set mandir ~/doc/services
- set manext .doc
- if {[llength $switches] != 1} {
- set switches man
- }
-
- setfield response DESCRIPTION "Results of your man request"
-
- if {[file exists [glob $mandir$switches$manext]]} {
- setfield response STRING [exec cat [glob $mandir$switches$manext]];
- } else {
- setfield response STRING [concat "
- No information is available about this service. The service either does not
- exist or does not have a manual page. A list of currently available services
- can be obtained using the 'services' service.
- -------------------------------------------------------------------------------
- |
- |
- " [exec cat [glob ${mandir}services${manext}]]]
- }
- return [mailout [turnaround $envelope] $response];
- }
-
-